/**
 * ourcarlife
 */
package com.whilefor.runner.modules.runner.entity;

import com.whilefor.runner.modules.sys.entity.User;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import com.whilefor.runner.common.persistence.DataEntity;

/**
 * 商品订单管理Entity
 * @author lins
 * @version 2016-04
 */
public class RunnerGoodsOrder extends DataEntity<RunnerGoodsOrder> {
	
	private static final long serialVersionUID = 1L;
	private User sellerId;		// 归属商家id
	private String sellerName;		// 归属商家名称
	private User consumerId;		// 用户id
	private User consumerName;		// 用户名称
	private String goodsId;		// 商品id
	private String goodsName;		// 商品名称
	private String oroderFrom;		// 订单来源
	private String orderMoney;		// 订单金额
	private String userPlannedPhone;		// 订单电话
	private String state;		// 订单状态
	
	public RunnerGoodsOrder() {
		super();
	}

	public RunnerGoodsOrder(String id){
		super(id);
	}

	@NotNull(message="归属商家id不能为空")
	public User getSellerId() {
		return sellerId;
	}

	public void setSellerId(User sellerId) {
		this.sellerId = sellerId;
	}
	
	@Length(min=0, max=64, message="归属商家名称长度必须介于 0 和 64 之间")
	public String getSellerName() {
		return sellerName;
	}

	public void setSellerName(String sellerName) {
		this.sellerName = sellerName;
	}
	
	@NotNull(message="用户id不能为空")
	public User getConsumerId() {
		return consumerId;
	}

	public void setConsumerId(User consumerId) {
		this.consumerId = consumerId;
	}
	
	public User getConsumerName() {
		return consumerName;
	}

	public void setConsumerName(User consumerName) {
		this.consumerName = consumerName;
	}
	
	@Length(min=1, max=100, message="商品id长度必须介于 1 和 100 之间")
	public String getGoodsId() {
		return goodsId;
	}

	public void setGoodsId(String goodsId) {
		this.goodsId = goodsId;
	}
	
	@Length(min=0, max=100, message="商品名称长度必须介于 0 和 100 之间")
	public String getGoodsName() {
		return goodsName;
	}

	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	
	@Length(min=1, max=6, message="订单来源长度必须介于 1 和 6 之间")
	public String getOroderFrom() {
		return oroderFrom;
	}

	public void setOroderFrom(String oroderFrom) {
		this.oroderFrom = oroderFrom;
	}
	
	public String getOrderMoney() {
		return orderMoney;
	}

	public void setOrderMoney(String orderMoney) {
		this.orderMoney = orderMoney;
	}
	
	@Length(min=0, max=20, message="订单电话长度必须介于 0 和 20 之间")
	public String getUserPlannedPhone() {
		return userPlannedPhone;
	}

	public void setUserPlannedPhone(String userPlannedPhone) {
		this.userPlannedPhone = userPlannedPhone;
	}
	
	@Length(min=1, max=6, message="订单状态长度必须介于 1 和 6 之间")
	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
}